function reg()
{
	var uname=document.getElementById("uname").value;
	var uid=document.getElementById("uid").value;
	var upw=document.getElementById("upw").value;
	var usex=document.getElementsByName("usex");
	var sex;
	for(var i=0;i<2;i++)
	{
		if(usex[i].checked==true)
		{
			sex=usex[i].value;
		}
	}
	var uage=document.getElementById("uage").value;
	var uemail=document.getElementById("uemail").value;

	
	
		localStorage.setItem("name",uname);
		localStorage.setItem("id",uid);
		localStorage.setItem("pw",upw);
		localStorage.setItem("sex",sex);
		localStorage.setItem("age",uage);
		localStorage.setItem("email",uemail);
		alert("注册成功！");
		location.href="login.html";
	
	
	

}
